Skip to content

fix: leftover pv_charging topic paths from PR #3812 topic migration - #3941

Merged
LKuemmel merged 1 commit into
openWB:masterfrom
seaspotter:fix-standard-legacy-bat-mode-topic
Sep 15, 2026
Merged

LKuemmel merged 1 commit into
openWB:masterfrom
seaspotter:fix-standard-legacy-bat-mode-topic

Conversation

@seaspotter

Copy link
Copy Markdown
Collaborator

Fix leftover topics from #3812

Fix: #3908 (comment)

…tion

processAllMqttMsg.js: standard_legacy's message dispatcher still only matched the old
chargemode_config/pv_charging/ prefix, so the retained bat_mode message never reached
processPvConfigMessages() after it moved to chargemode_config/bat/mode - the
Überschussverwendung radio buttons never showed the persisted selection on page load
(only after manually clicking one, via a separate local handler).

ParameterHandler.php: setBatPowerReserve() was left publishing to the old
pv_charging/bat_power_reserve topic, which setdata.py no longer validates - the endpoint
reported success without actually changing the reserve (same migration Copilot already
flagged for bat_mode on PR openWB#3812, but missed for bat_power_reserve).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Colors themes still publish battery mode changes to the obsolete topic.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates remaining MQTT topic references after the charging configuration migration.

Changes:

  • Moves SimpleAPI battery reserve writes to the canonical topic.
  • Updates legacy theme battery mode message routing.
File summaries
File Description
simpleAPI/src/ParameterHandler.php Updates battery reserve topic and documentation.
packages/modules/web_themes/standard_legacy/web/processAllMqttMsg.js Routes the migrated battery mode topic.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

else if (mqttTopic.match(/^openWB\/chargepoint\//i)) { processChargePointMessages(mqttTopic, mqttPayload); }
else if (mqttTopic.match(/^openWB\/vehicle\//i)) { processVehicleMessages(mqttTopic, mqttPayload); }
else if (mqttTopic.match(/^openWB\/general\/chargemode_config\/pv_charging\//i)) { processPvConfigMessages(mqttTopic, mqttPayload); }
else if (mqttTopic.match(/^openWB\/general\/chargemode_config\/bat\/mode$/i)) { processPvConfigMessages(mqttTopic, mqttPayload); }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Colors Theme @cshagen will take care of the implementation: #3466 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Da ging es eher um die neuen Features. Ich habe noch einen PR erstellt #3946

@LKuemmel
LKuemmel merged commit 822c470 into openWB:master Sep 15, 2026
1 check passed
@seaspotter
seaspotter deleted the fix-standard-legacy-bat-mode-topic branch September 15, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants